package com.itheima;

public class Test {
    public static void main(String[] args) {
        //目标:面向对象编程
        //创建对象的格式: 类名 对象名 = new 类名();
        Student s1 = new Student();
        s1.name = "陈平安";
        s1.chinese = 100;
        s1.math = 100;
        s1.printAllScore();
        s1.printAverageScore();

        //创建对象格式: 类名 对象名 = new 类名();
        Student s2 = new Student();
        s2.name = "宁姚";
        s2.chinese = 100;
        s2.math = 100;
        //调用类中的方法
        s2.printAllScore();
        s2.printAverageScore();
    }
}
